package com.cqtd.menu.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

@Entity
@Table(name = "t_button")
@DynamicUpdate(true)
@DynamicInsert(true)
public class Button implements Serializable {

	private static final long serialVersionUID = 1L;
	@Id
	@Column(name = "ID",length = 32)
	@javax.persistence.GeneratedValue(generator = "system-uuid")
	@org.hibernate.annotations.GenericGenerator(name = "system-uuid", strategy = "uuid.hex")
	private String id;
	@Column(name = "TEXT",length = 100,nullable = true)
	private String text;
	@Column(name = "ACTION",length = 100,nullable = true)
	private String action;
	@Column(name = "ICONCLS",length = 100,nullable = true)
	private String iconCls;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MENUNO", nullable = false)
	private Module module;//菜单编号
	
	public Module getModule() {
		return module;
	}
	public void setModule(Module module) {
		this.module = module;
	}
	@Column(name = "MENUID",length = 100,nullable = true)
	private String menuId;
	@Column(name = "STATUS",length = 100,nullable = true)
	private String status;
	@Column(name = "ORDERNO",nullable = true)
	private int orderNo;
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public String getAction() {
		return action;
	}
	public void setAction(String action) {
		this.action = action;
	}
	public String getIconCls() {
		return iconCls;
	}
	public void setIconCls(String iconCls) {
		this.iconCls = iconCls;
	}
	public String getMenuId() {
		return menuId;
	}
	public void setMenuId(String menuId) {
		this.menuId = menuId;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public int getOrderNo() {
		return orderNo;
	}
	public void setOrderNo(int orderNo) {
		this.orderNo = orderNo;
	}
	
}
